package com.sl.mes.app.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@SuppressWarnings("all")
@RestController
@RequestMapping(value = "/mes/transfer")
public class SupplierController {

    @RequestMapping(value = "/getOilPageInit", method = RequestMethod.GET)
    private Map<String, Object> getOilPageInit() {

        HashMap<String, Object> data = new HashMap<String, Object>();

        //库位maplist
        HashMap<String, Object> whMap1 = new HashMap<String, Object>();
        HashMap<String, Object> whMap2 = new HashMap<String, Object>();
        HashMap<String, Object> whMap3 = new HashMap<String, Object>();
        whMap1.put("id",2);
        whMap1.put("name","成都库位");
        whMap1.put("code","2222222");
        whMap1.put("total",10000);
        whMap2.put("id",3);
        whMap2.put("name","云南库位");
        whMap2.put("code","4444444");
        whMap2.put("total",5000);
        whMap3.put("id",4);
        whMap3.put("name","湖南库位");
        whMap3.put("code","8666666");
        whMap3.put("total",3000);
        List<Map<String, Object>> whlist = new ArrayList<Map<String, Object>>();
        whlist.add(whMap1);
        whlist.add(whMap2);
        whlist.add(whMap3);


        //供应商maplist
        HashMap<String, Object> supplier1 = new HashMap<String, Object>();
        HashMap<String, Object> supplier2 = new HashMap<String, Object>();
        HashMap<String, Object> supplier3 = new HashMap<String, Object>();
        supplier1.put("id", 2);
        supplier1.put("name", "中国石油物资有限公司");
        supplier1.put("code", "2222222");
        supplier2.put("id", 3);
        supplier2.put("name", "科威特国家石油公司");
        supplier2.put("code", "4444444");
        supplier3.put("id", 4);
        supplier3.put("name", "湖南石油有限公司");
        supplier3.put("code", "8666666");
        List<Map<String, Object>> supplierlist = new ArrayList<Map<String, Object>>();
        supplierlist.add(supplier1);//供应商1
        supplierlist.add(supplier2);
        supplierlist.add(supplier3);


        data.put("whlist",whlist);

        data.put("supplierlist",supplierlist);

        return data;

    }
}
